package com.ocom.xfrecode.mongo.service;

import com.ocom.xfrecode.mongo.MyEntityRepository;
import com.ocom.xfrecode.mongo.po.MyEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MyEntityService {

    @Autowired
    private MyEntityRepository repository;

    public MyEntity save(MyEntity entity) {
        return repository.save(entity);
    }

    public MyEntity findById(String id) {
        return repository.findById(id).orElse(null);
    }

    // 其他方法...
}
